﻿/// /////////////////////////////////////////////
// 单元名 : Platform
// 作者 : Hawk
// 单元描述 :
// 日期 : 2023-09-15
/// /////////////////////////////////////////////

{$IFDEF FPC}
{$H+}
{$MODE DELPHI}
{$ENDIF}
program Platform;

uses
  {$IFNDEF MYGDIP}
  GDIPApi,
  {$ELSE}
  unitGDIPlus,
  {$ENDIF }
  Forms,
  MainForm in 'MainForm.pas' {frmMain},
  unitConfig in 'unitConfig.pas',
  LoginForm in 'LoginForm.pas' {frmLoginForm},
  MsgBaseForm in '..\Common\MsgBaseForm.pas' {frmMsgBase},
  ProgressForm in 'ProgressForm.pas' {frmProgressInfo},
  unitClientCommonDef in 'unitClientCommonDef.pas',
  frameDLItem in 'frameDLItem.pas' {frDownloadItem: TFrame},
  HostControlPanel in 'HostControlPanel.pas' {frmHostControlPanel},
  UserManagerForm in 'UserManagerForm.pas' {frmMsgBaseUserManager},
  CompileConfigForm in 'CompileConfigForm.pas' {frmCompilerConfig},
  BaseDialog in 'BaseDialog.pas' {dlgBase},
  PrjDepInfo in 'PrjDepInfo.pas' {dlgProjectDeployInfo},
  ObjThresholdSet in 'ObjThresholdSet.pas' {dlgSetObjThreshold},
  unitSyncObj in '..\ServerMngModule\unitSyncObj.pas',
  unitDataCenter in '..\..\Common\unitDataCenter.pas',
  LogForm in 'LogForm.pas' {frmLogForm},
  ShareAndDLForm in 'ShareAndDLForm.pas' {frmMBShareAndDL},
  NewDLDlg in 'NewDLDlg.pas' {dlgNewDL},
  AVIForm in 'AVIForm.pas',
  DesktopForm in 'DesktopForm.pas' {frmDesktop},
  RemoteDeskDlg in 'RemoteDeskDlg.pas' {dlgRempteDesk},
  RemoteDeskForm in 'RemoteDeskForm.pas' {frmRemoteDesk},
  FileSyncForm in 'FileSyncForm.pas' {frmFileSync},
  RootFuncForm in 'RootFuncForm.pas' {frmMBRootFuncs},
  DebugUIForm in 'DebugUIForm.pas' {frmMBDebugUI},
  HostConfig in 'HostConfig.pas' {frmHostParamConfig},
  PrioritySetForm in 'PrioritySetForm.pas' {frmMsgBasePrioritySet},
  ResourcePrioritySetDlg in 'ResourcePrioritySetDlg.pas' {dlgResourcePrioritySet},
  ServerMngForm in 'ServerMngForm.pas' {frmServerMng},
  LocalShareFileForm in 'LocalShareFileForm.pas' {frmLocalShareFile},
  HostFileSystemForm in 'HostFileSystemForm.pas' {frmHostFileSystem},
  TransMngForm in 'TransMngForm.pas' {frmMBTransMng},
  DbgOutputForm in 'DbgOutputForm.pas' {frmDbgOutput},
  LotterForm in 'LotterForm.pas' {frmLotterForm};

{$R *.res}
  {$IFNDEF MYGDIP}

var
  GDIPTocken: nativeuint;

  procedure StartGDIPlus;
  var
    inp: TGdiplusStartupInput;
    oup: TGdiplusStartupOutput;
  begin
    inp.GdiplusVersion := 1;
    inp.DebugEventCallback := nil;
    inp.SuppressBackgroundThread := False;
    inp.SuppressExternalCodecs := False;
    GdiplusStartup(GDIPTocken, @inp, @oup);
  end;
  {$ENDIF}

begin
  IsMultiThread := True;
  StartGDIPlus;
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TfrmMain, frmMain);
  Application.Run;
end.
